import request from '@/utils/request';

export default {
    userRegister(query) {
        return request({
            url: '/index/userRegister',
            method: 'POST',
            data: query
        });
    },
    login(username, password) {
        return request({
            url: '/login?userName=' + username + '&password=' + password,
            method: 'POST'
        });
    },
    logout() {
        return request({
            url: '/logout',
            method: 'POST'
        });
    },
    getUserInfo() {
        return request({
            url: '/user/userInfo',
            method: 'GET'
        });
    }
};

